<?php

require("./dbconnect.inc.php");

mysql_connect($host,$dbuser,$dbpassword);
@mysql_select_db($database) or die( "Unable to select database");

$datagrab=sprintf("SELECT * FROM users ORDER BY username", mysql_real_escape_string($username));

$dataresult=mysql_query($datagrab);
$numdata=mysql_numrows($dataresult);

?>
<html>
	<body>
		<table border=1px>
			<tr>
				<td align="center">Username</td>
				<td align="center">pk_e</td>
				<td align="center">pk_n</td>
				<td align="center">sk_e</td>
				<td align="center">sk_n</td>
				<td align="center">sk_d</td>
				<td align="center">sk_p</td>
				<td align="center">sk_q</td>
				<td align="center">sk_dmp1</td>
				<td align="center">sk_dmq1</td>
				<td align="center">sk_coeff</td>
			</tr>
<?php

$j=0;
while($j < $numdata){
$username=mysql_result($dataresult,$j,"username");
$pk_e=mysql_result($dataresult,$j,"pk_e");
$pk_n=mysql_result($dataresult,$j,"pk_n");
$sk_e=mysql_result($dataresult,$j,"sk_e");
$sk_n=mysql_result($dataresult,$j,"sk_n");
$sk_d=mysql_result($dataresult,$j,"sk_d");
$sk_p=mysql_result($dataresult,$j,"sk_p");
$sk_q=mysql_result($dataresult,$j,"sk_q");
$sk_dmp1=mysql_result($dataresult,$j,"sk_dmp1");
$sk_dmq1=mysql_result($dataresult,$j,"sk_dmq1");
$sk_coeff=mysql_result($dataresult,$j,"sk_coeff");

?>
			<tr>
				<td><?php echo $username; ?></td>
				<td><?php echo $pk_e; ?></td>
				<td><?php echo $pk_n; ?></td>
				<td><?php echo $sk_e; ?></td>
				<td><?php echo $sk_n; ?></td>
				<td><?php echo $sk_d; ?></td>
				<td><?php echo $sk_p; ?></td>
				<td><?php echo $sk_q; ?></td>
				<td><?php echo $sk_dmp1; ?></td>
				<td><?php echo $sk_dmq1; ?></td>
				<td><?php echo $sk_coeff; ?></td>
			</tr>
<?php

$j++;
}

?>
	</table>
	</body>
	</html>